(function (root, factory) {
  if (typeof define === 'function' && define.amd) {
    // AMD
    define(['dep1', 'dep2'], factory);
  } else if (typeof exports === 'object' && typeof module === 'object') {
    // CommonJS
    module.exports = factory(require('dep1'), require('dep2'));
  } else {
    // 全局变量
    root.ModuleName = factory(root.dep1, root.dep2);
  }
})(typeof self !== 'undefined' ? self : this, function (dep1, dep2) {
  function divide(a, b) {
    return a / b;
  }

  return divide;
});